package com.yxplearn.mybatisplus.controller;

import com.yxplearn.mybatisplus.util.QPSCalculator;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class ViewQpsController {

    @ResponseBody
    @RequestMapping("/view")
    public Long viewQps() {
        System.out.println(Thread.currentThread().getName());
        return QPSCalculator.getInstance().getAvgQps();
    }
}
